package com.thirdpartylogin.trainingfacilityfrontend.service.impl;

import com.thirdpartylogin.trainingfacilityfrontend.entity.LostitemRetrieval;
import com.thirdpartylogin.trainingfacilityfrontend.mapper.lostitemRetrievalMapper;
import com.thirdpartylogin.trainingfacilityfrontend.service.lostitemRetrievalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class lostitemRetrievalServiceImpl implements lostitemRetrievalService {

    @Autowired
    lostitemRetrievalMapper  lostitemRetrievalMapper;

    @Override
    public Map<String,Object> LostAndFoundSearcher(String data, String location, Integer pageIndex, Integer pageSize) {
        Map<String,Object> map = new  HashMap<>();
        map.put("count",lostitemRetrievalMapper.LostitemCount(data,location));
        map.put("data",lostitemRetrievalMapper.LostAndFoundSearcher(data,location,pageIndex,pageSize));
        return map;
    }
}
